package homework.bank;

public class DepositCard implements BankCard {
    private double balance;
    String cardNumber;
    String cardCode;
    double Amount;
    public DepositCard() {
        balance = 0;
    }

    @Override
    public void deposit(String cardNumber, double amount) {
        balance = balance + amount;

    }

    @Override
    public void withdraw(double amount) {
        if (amount <= balance) {
            balance -= amount;
        } else {
            System.out.println("Insufficient balance");
        }
    }

    @Override
    public double checkBalance() {
        return balance;
    }
}
